package cn.edu.scau.cmi.houzhicong.abstractFactoryPattern.domain;

import javafx.scene.image.Image;

public abstract class Insurance {
    protected String name;
    protected String stuNum;
    protected Image image;

    public Insurance() {
    }

    public Insurance(String name, String stuNum, Image image) {
        this.name = name;
        this.stuNum = stuNum;
        this.image = image;
    }

    public abstract String getDesc();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    public Image getImage() {
        return image;
    }

    public void setImage(Image image) {
        this.image = image;
    }

    @Override
    public String toString() {
        return "[姓名：" + getName() + "，学号：" + getStuNum() + "]购买了" + getDesc();
    }
}
